// component/common/tab-nav-cloumn/tab-nav-cloumn.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    tabList: {
      type: Array,
      value: []
    },
    select: {
      type: String,
      value: '',
    }
  },


  /**
   * 组件的配置
   */
  options: {
    styleIsolation: 'isolated',
    pureDataPattern: /^_/
  },

  /**
   * 组件的初始数据
   */
  data: {
    select: ''
  },

  /**
   * 组件的数据监听
   */
  observers: {

  },

  /**
   * 组件的生命周期
   */
  lifetimes: {
    attached: function () {
      let t = this;
    },
    detached: function () {

    },
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onClickTab(e) {
      let t = this;
      let {
        select
      } = t.data
      let target = e.currentTarget.dataset.target || ''
      if (target === select) return
      t.triggerEvent('tabChange', target)
    },

  }
})